package com;

import org.apache.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;

/**
 * Created by zhengsenwen on 2017/7/1.
 */

@EnableCaching
@SpringBootApplication
public class Application extends SpringBootServletInitializer {

    private static Logger logger = Logger.getLogger(Application.class);

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {

        return builder.sources(Application.class);
    }

    public static void main(String[] args) {
        logger.info("The app is starting......");
        SpringApplication.run(Application.class, args);
        logger.info("The app is running......");
    }
}
